/**
 * author:Administrator
 * date:2016/2/24
 * desc:TODO
 */

'use strict';

let seq = 1;
let list = {};
let ROOT_PID = 0;

class CommentRepoImpl {

  static * genId() {
    return 'comment_' + (seq++);
  }

  static * find(id) {
    return list[id];
  }

  static * store(log) {
    if (!log.id) log.id = yield CommentRepoImpl.genId();
    list[log.id] = log;
  }
}
module.exports = CommentRepoImpl;